package com.mobileClientKernel.android.reactNative.service.reactNativeService.network;

import com.mobileClientKernel.android.serviceLayer.httpTransportService.network.JJTBaseRequest;
import com.mobileClientKernel.android.reactNative.service.reactNativeService.model.JJReactNativeModel;

public class JJReactNativeRequest extends JJTBaseRequest {
    public JJReactNativeRequest(String identity, org.json.JSONObject parameters, boolean isEncryption, Class modelClass, boolean isSaveToMemory, boolean isSaveToDisk) {
        super(identity, parameters, isEncryption, modelClass, isSaveToMemory, isSaveToDisk);

        setUserCacheDirectory("JJReactNativeService");
    }

    @Override
    public Object convertToModel(String responseString) {
        JJReactNativeModel model = (JJReactNativeModel) super.convertToModel(responseString);
        model.setRnDataContent(getResponseContentObject().toString());

        return model;
    }
}
